function [nrm] = lpNorm(u,v,p)
%Computes the Lp Norm of u and v 
    
   assert(size(v,1)==size(u,1));
   assert(size(u,2)==size(v,2) && size(v,2)==1);


   if (p == Inf)
       nrm=max(abs(u-v));
   else   
       nrm=sum(abs(u-v).^p)^(1/p); 
   end
   
end
